/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ve.com.cantv.worktables.ejb.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Ghust
 */
@Embeddable
public class RolmodulePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idrol")
    private int idrol;
    @Basic(optional = false)
    @Column(name = "idmodule")
    private int idmodule;

    public RolmodulePK() {
    }

    public RolmodulePK(int idrol, int idmodule) {
        this.idrol = idrol;
        this.idmodule = idmodule;
    }

    public int getIdrol() {
        return idrol;
    }

    public void setIdrol(int idrol) {
        this.idrol = idrol;
    }

    public int getIdmodule() {
        return idmodule;
    }

    public void setIdmodule(int idmodule) {
        this.idmodule = idmodule;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idrol;
        hash += (int) idmodule;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RolmodulePK)) {
            return false;
        }
        RolmodulePK other = (RolmodulePK) object;
        if (this.idrol != other.idrol) {
            return false;
        }
        if (this.idmodule != other.idmodule) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ve.com.cantv.worktables.ejb.entity.RolmodulePK[idrol=" + idrol + ", idmodule=" + idmodule + "]";
    }

}
